


/*
Project: 		The Impact of Short-Term Employment for Low-Income Youth: Experimental 	
				Evidence from the Philippines
Authors: 		Emily A. Beam and Stella Quimbo

***********************************
Path: 			code/02_analysis
File name: 		table_a02.do 
***********************************

Purpose: 		Generates Appendix Table A2 

Inputs: 		spes_data.dta

Outputs: 		table_a02.tex

Log: 			results/03_output/log_table_a02.log		

Last updated: 	18 November 2021
*/


cap log close 
log using "$output/log_table_a02.log",replace



loc filename "beamquimbo_tables"

use "$usedata_analysis/spes_data",clear 

// Output results
putexcel set "$tables_analysis/`filename'.xlsx",  sheet(Table A2,replace) modify

// Payment received from employer
tab  spes_payment_rcvd_employer, matcell(cellcounts)
	
	decode spes_payment_rcvd_employer,gen(_emp_payment_recode)
	replace _emp_payment_recode = "Not received directly" if regex(_emp_payment_recode,"Not received directly")
	levelsof _emp_payment_recode, local(r_labels)

matrix rownames cellcounts = `r_labels'

putexcel A1 = matrix(cellcounts), names



// Payment received from DOLE

tab  spes_payment_rcvd_dole, matcell(cellcounts)
	

matrix rownames cellcounts = `r_labels'

putexcel C2 = matrix(cellcounts)

log close 
exit 
